
<template>
  <PureInboxScreen :error="isError" />
</template>

<script lang="ts" setup>
import PureInboxScreen from '../PureInboxScreen/index.vue';

import { computed } from 'vue';

import { useTaskStore } from '@/store/task';

//👇 Creates a store instance
const taskStore = useTaskStore();
taskStore.fetchTasks();

//👇 Retrieves the error from the store's state
const isError = computed(() => taskStore.status==='error');
    
</script>
